﻿.table-container-fixed-header .table thead tr th.dropdown-table-fixed-header-visible {
    z-index: 11;
}

.dropdown-menu-position-strategy {
    width: max-content;
    top: 0;
    left: 0;
}

.dropdown-menu-position-strategy-absolute {
    position: absolute;
}

.dropdown-menu-position-strategy-fixed {
    position: fixed;
}

.dropdown.is-active .dropdown-menu {
    animation-duration: 0.3s;
    animation-fill-mode: both;
    animation-name: fadeIn;
}

.dropdown .dropdown-menu > .dropdown-content > .dropdown-item.is-disabled {
    pointer-events: none;
    opacity: .65;
}

.dropdown-header {
    display: block;
    padding: $dropdown-header-padding;
    margin-bottom: 0; // for use with heading elements
    font-size: $size-small;
    color: $dropdown-header-color;
    white-space: nowrap; // as with > li > a
}

.dropdown-menu.dropdown-menu-scrollable {
    max-height: var(--dropdown-list-menu-max-height, 200px);
    overflow-y: scroll;
}

.b-is-autocomplete .dropdown-menu {
    width: 100%;
    max-height: var(--autocomplete-menu-max-height, 200px);
    overflow-y: scroll;

    .dropdown-item.focus {
        background-color: #f5f5f5;
        color: #0a0a0a !important;
    }
}

.b-is-autocomplete.b-is-autocomplete-multipleselection {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
    width: 100%;
    cursor: text;
    border-color: $grey-lighter;
    border-style: solid;
    border-width: 1px;
    border-radius: .25rem;

    .field {
        flex-grow: 1;
    }

    input:not(.is-success, .is-danger) {
        border: none;
    }

    input {
        box-shadow: none;
        outline: none;
        background-color: transparent;
        max-width: inherit;
        width: 100%;
    }

    .tag {
        align-self: center;
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
        line-height: 1.5;
        flex-grow: initial;
    }

    &.focus {
        outline: 0;
        border: 1px solid transparent;
        border-color: #3273dc;
        box-shadow: 0 0 0 0.125em rgba(50,115,220, 0.25);
    }
}

.dropdown {
    .button.dropdown-trigger:not(.is-outlined) {
        box-shadow: none;
        border: none;
    }

    &.is-disabled.b-is-autocomplete {
        background-color: var(--b-theme-light, #f5f5f5);
    }

    .dropdown-menu > .dropdown-content {
        .dropdown {
            width: 100%;
        }

        .dropdown-trigger {
            width: 100%;
        }

        .dropdown-item {
            padding-right: .5rem;
            display: flex;
            justify-content: space-between;
        }

        > .dropdown:not(.is-up, .is-right, .is-left) {

            > .dropdown-menu {
                display: none;
                left: 0;
                min-width: 12rem;
                padding-top: 4px;
                position: absolute;
                top: 100%;
            }

            &.is-active {
                > .dropdown-menu {
                    display: block;
                }
            }
        }
    }

    &.is-up {
        > .dropdown-menu {
            display: none !important;
            bottom: auto;
            padding-bottom: 4px;
            padding-top: initial;
            top: auto;
        }

        &.is-active {
            > .dropdown-menu {
                display: block !important;
            }
        }
    }

    &.is-right {
        > .dropdown-menu {
            display: none !important;
            left: auto;
            bottom: auto;
            right: 0;
        }

        &.is-active {
            > .dropdown-menu {
                display: block !important;
            }
        }
    }

    &.is-left {
        > .dropdown-menu {
            left: 0;
            right: auto;
            bottom: auto;
            display: none !important;
        }

        &.is-active {
            > .dropdown-menu {
                display: block !important;
            }
        }
    }
}
